using System;

namespace PropertyExpression.Common
{
    public class Implementer<TSource>
    {
        private readonly TSource it;

        public Implementer(TSource it)
        {
            this.it = it;
        }

        public TResult _<TResult>()
        {
            return Cache<TResult>.Result(it);
        }

        private static class Cache<TResult>
        {
            public static readonly Func<TSource, TResult> Result = ImplExtensions.Build<TSource, TResult>();
        }
    }
}